package com.zzyl.mapper;


import com.github.pagehelper.Page;
import com.zzyl.entity.Reservation;
import com.zzyl.vo.ReservationVo;
import com.zzyl.vo.TimeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface CustomerReservationMapper {

    int getCount(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime,Long updateBy);

    void insert(Reservation reservation);

    List<TimeVo> getTime(@Param("startTime") LocalDateTime startTime, @Param("endTime") LocalDateTime endTime);

    Page<ReservationVo> listAll(Integer status,String createBy);
    @Select("select * from reservation where id=#{id}")
    Reservation removal(Long id);

    void update(Reservation reservation);

    void executeTask();
}
